package com.xuyiwei.mayi;

/**
 * Created by xuyiwei on 2019/4/15.
 */
public class JvmDemo02 {
    public static void main(String[] args) throws InterruptedException {
        //  -Xms20m -Xmx20m -Xmn1m -XX:SurvivorRatio=2 -XX:+PrintGCDetails -XX:+UseSerialGC

        byte[] b1 = new byte[1 * 1024 * 1024];
        System.out.println("分配了1m");
        JvmDemo01.jvmInfo();
        Thread.sleep(3000);
        byte[] b2 = new byte[4 * 1024 * 1024];
        System.out.println("分配了4m");
        Thread.sleep(3000);
        JvmDemo01.jvmInfo();

    }


}
